<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<head>
<link rel="stylesheet" media="screen" type="text/css"
	href="styles/1CssMaster.css" />

<link rel="stylesheet" media="screen" type="text/css"
	href="styles/tableau.css" />
	
<link rel="stylesheet" media="screen" type="text/css"
	href="styles/inscription.css" />	


<title>Inscrire</title>

</head>

<body>
	<div id="headerDroite">
			<h:form>
				<h:panelGrid columns="2">
					<h:outputText style="center:left" value="#{mbConnexion.leLogin}" />
					<h:commandButton value="Déconnexion"
						action="#{mbConnexion.deconnexion}" />
					<h:outputText style="center:left" />
					<h:outputText style="center:left" />
				</h:panelGrid>
			</h:form>
		</div>
		<div id="divTitre">
			<h1 id="nomLogiciel">Gepeto</h1>
			<img alt="" src="../../mairie/imagesGepeto/plumeSansFond.png"
				width="80px" height="80px" />

		</div>

	<div id="divMenuHaut">

		<ul id="ulMenuHaut">

			<li class="liMenuHaut"><a href="ficheEnfant.xhtml">Dossier
					Enfant</a></li>
			<li class="liMenuHaut"><a href="inscription.xhtml">Inscription</a></li>
			<li class="liMenuHaut"><a href="pointage.xhtml">Pointage</a></li>
			<li class="liMenuHaut"><a href="factConsultation.xhtml">Facturation</a></li>
			<li class="liMenuHaut"><a href="editions.xhtml">Editions</a></li>
			<li class="liMenuHaut"><a href="personnel.xhtml">Personnel</a></li>
		</ul>
	</div>
	<!--///////////////////////////////////menu gauche ///////////////////-->

<div id="divSousMenuGauche">

		<ul id="ulSousMenuGauche">
			<li class="liSousMenuGauche"><a href="inscription.xhtml">Inscrire des enfants</a></li>
			<li class="liSousMenuGauche"><a href="listeInscrits.xhtml">Liste inscrits</a></li>
			

		</ul>
	</div>
		
	<div id="centre">
<h:form id="formulaireEnfant" method="post" action="">
<div id="divRecherche">
<fieldset id="fieldSetRecherche">
				<legend>
					<b>Critères</b>
				</legend>
<!-- 		<h:form id="formulaireEnfant" method="post" action=""> -->
		
			<table>
				<tr>
    
					<td class="tdRech">
					<h:selectOneMenu id="selectEcole" value="#{beanInscriptionHib.idEcole}">
								<f:selectItem itemValue="1" itemLabel="prim.Georges-Cogniot" />
								<f:selectItem itemValue="2" itemLabel="prim.Fernand-Léger" />
								<f:selectItem itemValue="3" itemLabel="prim.Jean-Jaurès" />
								<f:selectItem itemValue="4" itemLabel="prim.Guy-Môquet" />
								<f:selectItem itemValue="5" itemLabel="prim.Paul-Bert" />
								<f:selectItem itemValue="6" itemLabel="prim.Paul-Vaillant-Couturier" />
								<f:selectItem itemValue="7" itemLabel="prim.Paul-Langevin" />
								<f:selectItem itemValue="8" itemLabel="prim.Henri-Barbusse" />
								<f:selectItem itemValue="9" itemLabel="mat.Georges-Cogniot" />
								<f:selectItem itemValue="10" itemLabel="mat.Fernand-Léger" />
								<f:selectItem itemValue="11" itemLabel="mat.Jean-Jaurès" />
								<f:selectItem itemValue="12" itemLabel="mat.Guy-Môquet" />
								<f:selectItem itemValue="13" itemLabel="mat.Paul-Bert" />
								<f:selectItem itemValue="14" itemLabel="mat.Paul-Langevin" />
								<f:selectItem itemValue="15" itemLabel="mat.Henri-Barbusse" />
							</h:selectOneMenu>
							</td>
							
					<th>
					<h:commandButton value="Rechercher" type="submit"
									action="#{beanInscriptionHib.chargementTableListeInscrits}">
									<f:ajax execute="selectEcole" render="table1"/>
								</h:commandButton> 
						</th>
						
				</tr>
			</table>
		
</fieldset>
		
	

			<fieldset id="fieldSetResultat">
				<legend>
					<b>Résultats</b>
				</legend>

				<div class="datagrid">
    		
    			<h:dataTable id="table1" value="#{beanInscriptionHib.listEnfantInscri}"
						var="inscri" styleClass="order-table" headerClass="order-table-header"
						rowClasses="order-table-odd-row,order-table-even-row">
 
    		<h:column>
    			<f:facet name="header">Fiche Enfant</f:facet>
                <h:commandLink actionListener="#{beanEleveMairie.actionFromInscription}" value="voir fiche" action="ficheEnfant">
                	<f:attribute name="NomEnfant" value="#{inscri.nomEnf}" />
                	<f:attribute name="PrenomEnfant" value="#{inscri.prenomEnf}" />
                </h:commandLink>
             
    		</h:column>
    		<h:column>
    			<f:facet name="header">Nom</f:facet>
    			#{inscri.nomEnf}
    		</h:column>
    		<h:column>
    			<f:facet name="header">Prénom</f:facet>
    			#{inscri.prenomEnf}
    		</h:column>
    		<h:column>
    			<f:facet name="header">Ecole</f:facet>
    			#{inscri.nomEcole}
    		</h:column>
    		<h:column>
    			<f:facet name="header">Classe</f:facet>
    			#{inscri.nomNiveau}
    		</h:column>
    		<h:column rendered="false">
    			<f:facet name="header">Id</f:facet>
    			#{inscri.idEnf}
    		</h:column>
    		
    		<h:column>
    			<f:facet name="header">Inscrire</f:facet>
                <h:commandLink actionListener="#{beanInscriptionHib.actionInscription}" value="Inscrire" action="inscrireFormulaire">
                	<f:attribute name="NomEnfant" value="#{inscri.nomEnf}" />
                	<f:attribute name="PrenomEnfant" value="#{inscri.prenomEnf}" />
                	<f:attribute name="IdEnfant" value="#{inscri.idEnf}" />
                </h:commandLink>
    		</h:column>
    		</h:dataTable>
					
				</div>
			</fieldset>

	
		<!-- ///////////////////////////////////////////////////////////////////////boutons générer///////////////////////////////// -->
		
		</div>
		</h:form>
</div>

</body>
</html>